<div class="animated fadeIn">

  <div style="margin-bottom: 20px" >
    <button class="btn btn-success btn-radius" data-toggle="modal" (click)="inputmodalbox.show();">添加角色</button>
  </div>


  <div class="table-responsive">
    <table class="table table-center table-bordered  table-hover" style="min-width: 0">
      <thead class="table-inverse">
      <tr>
        <td>序号</td>
        <td>用户角色</td>
        <td>功能设置</td>
        <td>操作</td>
      </tr>
      </thead>
      <tbody class="tab-content">
      <tr *ngFor="let item of roleFunction let i = index">
        <td>{{i+1}}</td>
        <td>
          {{item.name}}
        </td>
        <td>
          <a href="javascript:;" (click)="operation(item.id)">操作设置</a>
        </td>
        <td>
          <span *ngIf="item.is_ss != 0" style=" color: #9E9E9E; cursor: default;">删除</span>
          <span class="removeBtn" *ngIf="item.is_ss == 0" (click)="delectIndex(item.id)">删除</span>
        </td>
      </tr>
      </tbody>
    </table>
    <p *ngIf="noDatastring"  class="noneData">暂无数据</p>
  </div>
</div>
<div *ngIf="dangerModal" [config]="{ show: true }" (onHidden)="hideModal()" bsModal #autoShownModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
  <div class="modal-dialog modal-sm modal-danger">
    <div class="modal-content">

      <div class="modal-header">
        <h4 class="modal-title pull-left">提示</h4>
        <button type="button" class="close pull-right" aria-label="Close" (click)="hideModal()">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>

      <div class="modal-body" style="text-align: center;">
        <p style="margin: 0px">{{completePrompt}}</p>
      </div>

      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" (click)="hideModal()">取消</button>
        <button type="button" class="btn btn-danger" (click)="confirmDelete();">确定</button>
      </div>

    </div>
  </div>
</div>



<div bsModal #inputmodalbox="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

  <div class="modal-dialog modal-primary modal-sm" role="document">
    <div class="modal-content">

      <div class="modal-header">
        <h5 class="modal-title">添加角色</h5>
        <button type="button" class="close" (click)="inputmodalbox.hide()" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>


      <div class="modal-body" style="text-align: center" >
        <div class="row">
          <span class="text-line">*角色名称：</span>
          <div>
            <input type="text"  class="btn-radius form-control" placeholder="请输入角色名称" [(ngModel)]="roleName" name="name" maxlength="10">
          </div>
        </div>
      </div>


      <div class="modal-footer">
        <button type="button"  class="btn btn-secondary" (click)="inputmodalbox.hide()">取消</button>
        <button type="button" class="btn btn-primary" (click)="inputmodalbox.hide();addmodify();">完成</button>
      </div>


    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div>






<div *ngIf="delectModal" [config]="{ show: true }" (onHidden)="confirmshutdown()" bsModal #autoShownModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
  <div class="modal-dialog modal-sm" [ngClass]="{'modal-success':issuccess,'modal-danger':!issuccess}">
    <div class="modal-content">

      <div class="modal-header">
        <h4 class="modal-title pull-left">提示</h4>
        <button type="button" class="close pull-right" aria-label="Close" (click)="confirmshutdown()">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>

      <div class="modal-body" style="text-align: center">
        <span>{{modelBody}}</span>
      </div>

      <div class="modal-footer">
        <button type="button" class="btn " [ngClass]="{'btn-success':issuccess,'btn-danger':!issuccess}" (click)="confirmshutdown();">确定</button>
      </div>
    </div>
  </div>
</div>



<div *ngIf="JurisdictionModal" [config]="{ show: true }" (onHidden)="Jurisdiction()" bsModal #autoShownModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
  <div class="modal-dialog modal-primary ">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title pull-left">功能设置</h4>
        <button type="button" class="close pull-right" aria-label="Close" (click)="Jurisdiction()">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body" style="text-align: left">
        <div style="margin-left: 170px" *ngFor="let item of determinationData let j = index">
          <label style="padding-bottom: 10px" class="form-check-label checkboxStyle"   >
            <input class="form-check-input" [(ngModel)]="item['isChecked']" type="checkbox" [value]="item.vid" (click)="selectCheckbox($event.target.checked, item)" > {{item.name}}
          </label>

        </div>
      </div>


      <div class="modal-footer">
        <button type="button"  class="btn btn-secondary btn-radius" (click)="Jurisdiction()">取消</button>
        <button type="button" class="btn btn-primary btn-radius" (click)="Authoritydetermination();">确定</button>
      </div>
    </div>
  </div>
</div>